package com.google.codejam.reversewords;

import com.google.codejam.core.test.ACodeJamTestCase;
import com.google.codejam.core.test.ACodeJamTestSuiteRunner;

import java.io.IOException;

/**
 * Concrete implementation of the <code>ACodeJamTestSuiteRunner</code> for the
 * "Reverse Words" problem.
 */
public class ReverseWordsTestSuiteRunner extends ACodeJamTestSuiteRunner
{
	public ReverseWordsTestSuiteRunner(String test_suite_name)
	{
		super(test_suite_name);
	}

	/**
	 * Reads enough from the input to instantiate a concrete instance of a
	 * <code>ACodeJamTestCase</code>, <code>ReverseWordsTestCase</code>
	 * in this case. Each test case consists of one line from the input file,
	 * which contains the number of integers to expect.
	 *
	 * @return Instantiated <code>ACodeJamTestCase</code> instance.
	 * @throws IOException
	 */
	@Override
	protected ACodeJamTestCase initNextTestCaseFromInput()
			  throws IOException
	{
		ACodeJamTestCase test_case = new ReverseWordsTestCase();

		test_case.parseDataString(input_reader.readLine());

		return test_case;
	}
}
